#ifndef NODE_H
#define NODE_H

#include <QPointF>

//! Main structural element of the model.
/*!
  Implements the basic element of the model.
  */
struct NODE
{
    explicit NODE(void);

    bool isBoundary;     //!< If \c true node is boundary for the cell. It knows its neighbour nodes \sa id1 \sa id2
    bool isFrontal;      //!< If \c true actint polymerization force is generated at this node. Pol force is normal to the cell bounding polygon.
    QPointF pos;         //!< Current position of the node. Calculated every iteration.

    /* Calculatable */
    double id1;          //!< First boundary neighbour node. Undefined for non-boundary nodes.
    double id2;          //!< Second boundary neighbour node. Undefined for non-boundary nodes.
    double fx;           //!< X-projection of the resulting force [newton].
    double fy;           //!< Y-projection of the resulting force [newton].
    double sigma;        //!< Total substrate stiffness under node [newton/meter^2].
    QPointF adhesionPos; //!< Position of the adhesion cite of the adhesion spring.

    double fxMonitor;    //!< Auxiliary variable. First introduced for force monitoring for vector fields.
    double fyMonitor;    //!< Auxiliary variable. First introduced for force monitoring for vector fields.
};

#endif // NODE_H
